/**
 * Copyright(c) 2010 Ceno Techonologies Co., Ltd.
 *
 * History:
 *   15-1-14 下午2:43 Created by lyyang
 */
package com.jade.bss.business.activity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.*;

/**
 * 活动类
 *
 * @author <a href="mailto:lyyang@ceno.cn">lyyang</a>
 * @version 1.0 15-1-14 下午2:43
 */
@Entity
@Table (name = "BSS_ACTIVITY")
public class Activity
        implements Serializable
{
    //停用状态
    public static final int STATUS_STOP = 0;
    //启用状态
    public static final int STATUS_RESET = 1;
    @Id
    @GeneratedValue (generator = "BSS_SEQ_ACTIVITY")
    @SequenceGenerator (name = "BSS_SEQ_ACTIVITY", sequenceName = "BSS_SEQ_ACTIVITY")
    private long id;
    @Column (name = "owner_id")
    private String ownerId;
    @Column (name = "owner_type")
    private String ownerType;
    private String title;
    private String description;
    private String logo;
    private String strip;
    private String introduction;
    @Column (name = "publish_date")
    private Date publishDate;
    @Column (name = "deadline_date")
    private Date deadlineDate;
    //status
    @Column (name = "status", nullable = false)
    private int status = STATUS_RESET;
    //是否推荐
    @Column (name = "recommend")
    private boolean recommend;
    //更多图片
    @ElementCollection (targetClass = String.class, fetch = FetchType.EAGER)
    @CollectionTable (name = "BSS_ACTIVITY_IMAGES",
            joinColumns = {@JoinColumn (nullable = false, name = "activity_id", referencedColumnName = "id")})
    @Column (name = "images", length = 255)
    private List<String> moreImages;

    public long getId()
    {
        return id;
    }

    public void setId(long id)
    {
        this.id = id;
    }

    public String getOwnerId()
    {
        return ownerId;
    }

    public void setOwnerId(String ownerId)
    {
        this.ownerId = ownerId;
    }

    public String getOwnerType()
    {
        return ownerType;
    }

    public void setOwnerType(String ownerType)
    {
        this.ownerType = ownerType;
    }

    public String getTitle()
    {
        return title;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getDescription()
    {
        return description;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getLogo()
    {
        return logo;
    }

    public void setLogo(String logo)
    {
        this.logo = logo;
    }

    public Date getPublishDate()
    {
        return publishDate;
    }

    public void setPublishDate(Date publishDate)
    {
        this.publishDate = publishDate;
    }

    public Date getDeadlineDate()
    {
        return deadlineDate;
    }

    public void setDeadlineDate(Date deadlineDate)
    {
        this.deadlineDate = deadlineDate;
    }

    public List<String> getMoreImages()
    {
        return moreImages;
    }

    public void setMoreImages(List<String> moreImages)
    {
        this.moreImages = moreImages;
    }

    public String getStrip()
    {
        return strip;
    }

    public void setStrip(String strip)
    {
        this.strip = strip;
    }

    public String getIntroduction()
    {
        return introduction;
    }

    public void setIntroduction(String introduction)
    {
        this.introduction = introduction;
    }

    public int getStatus()
    {
        return status;
    }

    public void setStatus(int status)
    {
        this.status = status;
    }

    public boolean isRecommend()
    {
        return recommend;
    }

    public void setRecommend(boolean recommend)
    {
        this.recommend = recommend;
    }
}
